/**
 *
 */
package com.fita.webpay.entity.config;

import org.apache.commons.lang3.StringUtils;

import com.demo2do.core.wechat.entity.pay.PayConfig;

/**
 * @author downpour
 *
 */
public class AlipayConfig implements PayConfig {

    private String appid;

    private String sellerId;

    private String notifyUrl;

    private String remoteIp;
    
    private String publicKey;
    
    private String privateKey;

    
    /**
     * 
     * @param appid
     * @param key
     * @param publicKey
     * @param notifyUrl
     */
    public AlipayConfig(String appid, String key, String publicKey, String notifyUrl) {
        this.appid = appid;
        this.privateKey = key;
        this.publicKey = publicKey;
        this.notifyUrl = notifyUrl;
    }
    
    /**
     * @return the appid
     */
    public String getAppid() {
        return appid;
    }



    /**
     * @return the sellerId
     */
    public String getSellerId() {
        return sellerId;
    }



    /**
     * @return the notifyUrl
     */
    public String getNotifyUrl() {
        return notifyUrl;
    }



    /**
     * @return the remoteIp
     */
    public String getRemoteIp() {
        return remoteIp;
    }



    /**
     * @return the publicKey
     */
    public String getPublicKey() {
        return publicKey;
    }



    /**
     * @return the privateKey
     */
    public String getPrivateKey() {
        return privateKey;
    }



    /**
     * @param appid the appid to set
     */
    public void setAppid(String appid) {
        this.appid = appid;
    }



    /**
     * @param sellerId the sellerId to set
     */
    public void setSellerId(String sellerId) {
        this.sellerId = sellerId;
    }



    /**
     * @param notifyUrl the notifyUrl to set
     */
    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }



    /**
     * @param remoteIp the remoteIp to set
     */
    public void setRemoteIp(String remoteIp) {
        this.remoteIp = remoteIp;
    }



    /**
     * @param publicKey the publicKey to set
     */
    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }



    /**
     * @param privateKey the privateKey to set
     */
    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }



    /* (non-Javadoc)
     * @see com.demo2do.core.wechat.entity.pay.PayConfig#match(java.lang.String, java.lang.String)
     */
    public boolean match(String appid, String sellerId) {
        return StringUtils.equals(this.appid, appid) && StringUtils.equals(this.sellerId, sellerId);
    }
}
